<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>

        //系统函数  js定义具有某种功能的函数
        //字符串转为数字 或转小数

        var num1 = "999.99abcd";
        //将字符串转为整数
        //num1 = parseInt(num1);

        //将字符串转为小数
        num1 = parseFloat(num1);

        alert(num1 + 1);

        //判断一个数是否是非数字
        var num2 = "123a";
        alert(isNaN(num2));



    </script>
</head>

<body>

</body>

</html>